import { getUserEnterprise  } from  '@/services/enterprise';
const Model = {
  namespace: 'workplace',
  state: {
    activities: [],
    radarData: [],
    enterpriseUser:{}
  },
  effects: {
    *getUserEnterprise(_,{call, put}){
      const response = yield call(getUserEnterprise);
      yield put({
        type: 'setUserEnterprise',
        payload: response,
      });
    },
  },
  reducers: {
    setUserEnterprise(state, { payload }){
      return { ...state, enterpriseUser:payload.data };
    },
  },
};
export default Model;
